<%@ page import = "java.util.*,com.ibatis.sqlmap.client.SqlMapClient,com.meetablog.util.SqlMapConfig" %>
<jsp:useBean id="util" class="com.meetablog.util.Util"/>
<%
	//sqlMap 생성
	SqlMapClient sqlMap =  SqlMapConfig.getSqlMapClient();
	
	// 검색조건 parameter 생성
	HashMap param = new HashMap();	//	검색조건을 담을 해쉬맴 (key, value);
	
	String nickname = request.getParameter("nickname");
	param.put("nickname", nickname);
	
	int cnt = 0;
	
	if(nickname != ""){
		HashMap map	 = 	(HashMap)sqlMap.queryForObject("Member.checkNick",param);	//	실행할 SQL ID, 검색조건(없을경우 null)
		cnt = Integer.parseInt(map.get("cnt").toString());
		
		if(cnt > 0){
			out.print("false");    //중복닉네임
		} else {
			out.print("true");     //ok
		}
	}
%>